package com.whccb.apps.office.document.util;

import com.actionsoft.bpms.commons.formfile.model.delegate.FormFile;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.server.fs.DCContext;
import com.actionsoft.bpms.server.fs.dc.DCProfileManager;

public class IWebOfficeUtil {
	public static DCContext getWebOfficeDc(FormFile formFile) {
		DCContext dc = new DCContext(UserContext.fromUID("admin"),
				DCProfileManager.getDCProfile(formFile.getAppId(),
						"!iweboffice-"), formFile.getAppId(),
				formFile.getProcessInstId(), formFile.getBoItemName(),
				formFile.getFileName());
		return dc;
	}
}
